package com.jeff.tianti.controller.channel;

import com.jeff.tianti.cms.dto.LeaderQueryDTO;
import com.jeff.tianti.cms.entity.Leader;
import com.jeff.tianti.cms.service.LeaderService;
import com.jeff.tianti.common.dto.AjaxResult;
import com.jeff.tianti.common.entity.PageModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;

/**
 * @author NOW_GO
 * @desc LeaderController
 * @date 2019-07-12
 */
@RestController
@RequestMapping("/channel/leader")
@CrossOrigin(maxAge = 3600)
public class LeaderController {

    @Autowired
    private LeaderService leaderService;

    @RequestMapping(value = "/list", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public AjaxResult list() {
        List<Leader> result = leaderService.queryLeaderList(null);
        return AjaxResult.setSuccessData(result);
    }

}